﻿using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

namespace HamcoWcs.DAL.Migrations
{
    public partial class A35 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "heart_beat_log",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "主键Id")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    TID = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "心跳标识")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    HBTarget = table.Column<int>(type: "int", nullable: false, comment: "心跳对象"),
                    HBType = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "心跳类型（收|发）"),
                    ACK = table.Column<bool>(type: "tinyint(50)", maxLength: 50, nullable: false, comment: "是否确认"),
                    HBTime = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "心跳时间")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_heart_beat_log", x => x.Id);
                },
                comment: "心跳日志")
                .Annotation("MySql:CharSet", "utf8mb4");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "heart_beat_log");
        }
    }
}
